#!/bin/bash
# =============================================================================
#      FileName: install_arm_linux.sh
#          Desc: 
#        Author: joseph_lee
#         Email: joseph_lee2633@163.com
#      HomePage: 
#       Version: 0.0.1
#    LastChange: 2014-04-28 22:33:12
#       History:
# =============================================================================
axel -n 8 http://ftp.snapgear.org/pub/snapgear/tools/arm-linux/arm-linux-tools-20080623.tar.gz > /dev/null 2>&1 &


echo -e "\e[32m\t Waiting for arm-linux-tools-20080623.tar.gz download over...\e[0m"
downloading=true
while downloading
do
	PROSS=`ps -el| grep axel | awk '{print $14}'`
	if [[ $PROSS = "axel" ]]; then
		downloading=true
		sleep 1
	else
		ddownloading=false
	fi
done
echo -e "\e[32m\t arm-linux-tools-20080623.tar.gz download OK!\e[0m"
sudo cp arm-linux-tools-20080623.tar.gz /
cd /
sudo tar -xvf arm-linux-tools-20080623.tar.gz
sudo rm arm-linux-tools-20080623.tar.gz
echo -e "\e[32m:Install OK\e[0m"
